﻿<form v-bind:action="template.header.action" v-bind:method="template.header.method">
    <div v-for="item in template.items">
        <div>{{item.label}}</div>
        <div v-if="item.type==='textarea'">
            <textarea v-bind:name="item.fieldName">{{item.defaultValue}}</textarea>
            <span>{{item.normalMessage}}</span>
        </div>
        <div v-else>
            <input v-bind:type="item.type"
                   v-bind:name="item.fieldName"
                   v-bind:value="item.defaultValue"
                   validate="{required:true}"
                   class="{required:true}" />
            <span>{{item.normalMessage}}</span>
        </div>
    </div>
    <div>
        <input type="submit" value="提交" />
    </div>
</form>